package com.imooc.web.user.entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * @author horay
 * @category Class description
 * @email horay_hyc@qq.com
 * @date 2018/1/28 21:25
 */
@Entity
@Table(name = "user")
@Data
public class User {

    /**
     * @category 用户唯一id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    /**
     * @category 用户名
     */
    private String name;
    /**
     * @category 电子邮箱
     */
    private String email;
    /**
     * @category 电话号码
     */
    @Column(name = "phone_number")
    private String phoneNumber;
    private String password;
    private Integer status;
    @Column(name = "create_time")
    private Date createTime;
    @Column(name = "last_login_time")
    private Date lastLoginTime;
    @Column(name = "last_update_time")
    private Date lastUpdateTime;
    private String avatar;

}
